
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/base/base.jsp" %>
<%@ include file="/base/database.jsp" %>

<%
  
       request.setCharacterEncoding("utf-8");

      String loginNo =request.getParameter("loginNo");
      String mangerName  =request.getParameter("managerName");
      String department  =request.getParameter("department");
      String password    =request.getParameter("password");
      String telephone    =request.getParameter("telephone");

   StringBuffer sqlBuff=new StringBuffer();
   sqlBuff.append("update sys_manager set loginNo=?,managerName=?,department=?,password=?,telephone=? where loginNo=?");   

   String sql=sqlBuff.toString();

   Connection conn=getConn();

    PreparedStatement pstmt=conn.prepareStatement(sql);
  
       int parameterIndex=1;
       
       pstmt.setString(parameterIndex++, loginNo);
       pstmt.setNString(parameterIndex++, mangerName);
       pstmt.setNString(parameterIndex++, department);
       pstmt.setString(parameterIndex++, password);
       pstmt.setString(parameterIndex++, telephone);
       pstmt.setString(parameterIndex++, loginNo);
  
       int c=pstmt.executeUpdate();
  
       if(pstmt!=null){
         pstmt.close();
        }
       if(conn!=null){
         conn.close();
        }

	process(request, response, "/page/manager/manager_list.jsp");

%>